package cn.sytton.taffe.job.controller;

import cn.sytton.taffe.job.entity.JobLogEntity;
import cn.sytton.taffe.job.service.IJobLogService;
import com.github.pagehelper.PageInfo;
import cn.sytton.taffe.framework.base.controller.BaseController;
import cn.sytton.taffe.framework.base.entity.PageParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 定时任务控制层
 *
 * @author skyrock
 */
@Tag(name = "定时任务日志")
@RestController
@RequiredArgsConstructor
@RequestMapping("/job/log")
public class JobLogController extends BaseController {

    private final IJobLogService jobLogService;

    @Operation(summary = "查询分页定时任务列表")
    @Parameter(name = "pp", description = "分页参数对象", in = ParameterIn.QUERY, required = true)
    @GetMapping
    public PageInfo<JobLogEntity> findPage(PageParam pp) {
        return jobLogService.findListPageOfXml(pp);
    }

}
